<template>
  <main_header></main_header>
  <el-container>
    <el-container>
      <el-aside width="200px">
        <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
          <el-sub-menu index="1">
            <template #title>
              <el-icon>
                <location />
              </el-icon>
              <span>市场部</span>
            </template>
            <el-menu-item-group title="">
              <el-menu-item v-for="i in menu_list" :index="`${i.id}`" @click="change_menu(i.path)">{{
                i.name
              }}</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
        </el-menu>
      </el-aside>
      <el-main><router-view></router-view></el-main>
    </el-container>
  </el-container>
</template>

<script setup>
import { ref } from "vue"
import { useRouter } from "vue-router"
import main_header from '../../components/header.vue'
let menu_list = ref([
  { id: 1, name: '学生管理', path: '/markheader/student' },
])

let router = useRouter()
function change_menu(path) {
  router.push(path)
}

function handleClose() {

}
function handleOpen() {

}
</script>

<style scoped></style>